package com.gxar.timeline.server.db.model;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * @author linsy
 * @version 1.0
 * @created 2023/9/21 17:36
 */
@Entity
@Getter
@Setter
@NoArgsConstructor
@Table(name = "product_picture")
public class ProductPictureEntity {

    /**
     * 产品图片id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    /**
     * 产品id
     */
    private Long productId;

    /**
     * 产品类别（1-头显）
     */
    private Integer category;

    /**
     * 是否主图
     */
    private Boolean main;

    /**
     * 产品图片地址
     */
    private String url;

    /**
     * 创建时间
     */
    @Column(nullable = false)
    private Date createdAt;
}
